package com.situ.day10;
import org.junit.Test;

public class OOPDemo {

    //1、使用同一个包下面的类是不用import
    //2、在不同包下面需要import
    //3、java.lang放了java中很多的常用类，使用这个包下面的类是不用import
    @Test
    public void test34() {
        Student student1 = new Student();
        //student1.id = 1;
        //student1.name = "zhangsan";
        //student1.age = 223;
        //System.out.println(student1.age);
        student1.setAge(323);
        int age = student1.getAge();
        System.out.println(age);
    }

    @Test
    public void test2() {
        //构造方法
        Student student = new Student();
        student.setId(1);
        student.setName("lisi");
        student.setAge(23);
        student.setGender("男");
        System.out.println(student);
    }

    @Test
    public void test3() {
        Student student = new Student(2, "lisi", 23, "男");
        System.out.println(student.toString());
    }
}
